<?php
namespace lib;

use rabbit\exception\RabbitException;
use rabbit\Rabbit;
use lib\DemoConsumer;

require __DIR__ . '/vendor/autoload.php';

// 启动消费进程命令？
$rabbit = new Rabbit();

$DemoConsumer =  new DemoConsumer();//消费处理类

try {
    $rabbit->cost( $rabbit->config->get('exchange'), $rabbit->config->get('routerKey'), $rabbit->config->get('queueName',''), $DemoConsumer,'');
} catch (RabbitException $e) {
    //todo::错误
}



